//index.js
//获取应用实例
const app = getApp()
const OBSuploadFile = require('../../OBS/OBSUploadFile.js');

Page({
  data: {
    motto: '',

  },
  upload: function (res) {
    wx.chooseImage({          //选择待上传的图片
      success(res) {
        const tempFilePaths = res.tempFilePaths;
        OBSuploadFile(tempFilePaths[0]);
      }
    })    
    
    
    /*wx.chooseMessageFile({      //选择待上传的文件
      count: 10,
      type: 'image',
      success(res) {
        const tempFilePaths = res.tempFiles[0].path;
        console.log(tempFilePaths);
        OBSuploadFile(tempFilePaths);
      }
    })*/
}
})